package com.headwire.kw.helpers;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

public class FileLoader {
	public static List<String> loadLines(String filename) {
		
		LinkedList<String> lines = new LinkedList<String>();
		String cur;
		try {
			BufferedReader in = new BufferedReader(new FileReader(filename));
			while((cur = in.readLine())!= null){
				if(cur.trim().length()>0)
					lines.add(cur.trim());
			}
			in.close();
		} catch(IOException e) {
			System.err.println(e.getMessage());
			// do nothing
		}
		
		return lines;
	}
}
